<?php if($this->featureDetail != null){ ?>
<?php foreach($this->featureDetail as $key => $value){ ?>
	<div class="form-group">
	<label class="col-sm-2 control-label"> <?php echo $value['FeatureName'];?></em> <span class="symbol required"></span>
	</label>	
	<div class="col-sm-9 col-feature-detail">
		<?php
			unset($value['FeatureName']);						
			if($value['isDetailProduct']){	
				unset($value['isDetailProduct']);		
				foreach ($value as $item){
		?>
		<div class="checkbox">
			<label > 
				<input type="checkbox" class="grey feature-checkbox" name="optionDetail['<?php echo $item['id'];?>'][featureDetailId]" data-name='<?php echo $item['titleVi'];?>' value="<?php echo $item['id'];?>"> <?php echo $item['titleVi'];?>
			</label>
		</div>
		<div class="fade-in">
			<div class="col-sm-3">
				<input type="text" placeholder="Giá cộng thêm" name="optionDetail['<?php echo $item['id'];?>'][pricePlus]" class="form-control format-price">
			</div>
			<div class="col-sm-3">
				<input type="text" placeholder="Số lượng" name="optionDetail['<?php echo $item['id'];?>'][amountFeatureDetail]" class="form-control">
			</div>
			<?php if($item['isMultiImage'] == 1){?>
			<div style="display: inline; border: solid 1px #7FAAFF; background-color: #C5D9FF; padding: 5px;">
				<span id="spanButtonPlaceholder-<?php echo $item['id'];?>"></span>
			</div>		
			<div id="divFileProgressContainer-<?php echo $item['id'];?>" style="height: 35px;"></div>
			<div id="thumbnail-<?php echo $item['id'];?>" class='thumbnails'>
				<?php 
					$tmps = $this->tmp;
					if(isset($tmps[$item['id']]) && $tmps[$item['id']] != null){
						foreach($tmps[$item['id']] as $itemTmp){
							echo '<div class="result-img">';
							echo '<img src="/admin/upload/get-thumb-product/id/'.$itemTmp['id'].'" style="opacity: 1;">';
							echo '<div class="close-img" data-id="'.$itemTmp['id'].'" onclick="javascript:removeImage(this);"></div>';
							echo '</div>';
						}
					}
				?>
			</div>
			
			<script type="text/javascript">	
				var id = <?php echo $item['id'];?>;
				var arrParams = {};
				arrParams['dir'] = 'products';
				arrParams['thumb'] = true;
				arrParams['featureDetailId'] = id;
				upload('spanButtonPlaceholder-'+id, 'divFileProgressContainer-'+id, 'thumbnail-'+id, '/admin/upload', arrParams);
			</script>
			<!-- 
			<div class="fileupload fileupload-new" data-provides="fileupload">
				<input type="hidden" value="" name="">
				<div class="fileupload-new thumbnail no-image" style="width: 100px; height: 80px;">
					<div class="fileupload-image"><i class="clip-image"></i></div>
				</div>
				<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 100px; max-height: 80px; line-height: 10px;"></div>
				<div>
					<span class="btn btn-light-grey btn-file"><span class="fileupload-new"><i class="icon-picture"></i> Select image</span><span class="fileupload-exists"><i class="icon-picture"></i> Change</span>
						<input type="file" name='images[]'/>
					</span>
					<a href="#" class="btn fileupload-exists btn-light-grey" data-dismiss="fileupload">
						<i class="icon-remove"></i> Remove
					</a>
				</div>
			</div>
			 -->
			<?php } ?>
		</div>		
		<div class="clearb"></div>
		<?php 
				}
			} else { 
		?>		
		
			<select name='option[]' class="form-control" style='width:250px'>
			<?php 
				unset($value['isDetailProduct']);		
				foreach ($value as $item){
					echo '<option value="'.$item['id'].'">'.$item['titleVi'].'</option>';
				}
			?>
			</select>
				
		<?php } ?>
	</div>
	</div>
<?php } ?>

<?php }?>